import React, { Component } from 'react'
import { Redirect, Route } from 'react-router-dom'

export default class PrivateRoute extends Component {
    render() {
        let islogin=localStorage.getItem("islogin")
        return (
            <div>
                {islogin?<Route {...this.props}></Route>:<Redirect to="/login"></Redirect>}
            </div>
        )
    }
}
